From: Lukáš Tyrychtr Date: Tue, 25 Nov 2025 14:26:09 +0000 (+0100) Subject: capsLockWarning: Mark as not visible to a11y tree when hidden X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~44^2~62 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ccd1a0b8f52e29ccd2356c5d2ac34e473b174cd0;p=gnome-shell.git capsLockWarning: Mark as not visible to a11y tree when hidden We're animating it away, but not for the a11y tree. This fixes it, so the caps lock warning is not read regardless of the state of the key. Part-of: --- diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js index ddbd4d47b..defbf8712 100644 --- a/js/ui/shellEntry.js +++ b/js/ui/shellEntry.js @@ -1,3 +1,4 @@ +import Atk from 'gi://Atk'; import Clutter from 'gi://Clutter'; import GObject from 'gi://GObject'; import Pango from 'gi://Pango'; @@ -197,6 +198,14 @@ class CapsLockWarning extends St.Label { const [, height] = this.get_preferred_height(-1); this.natural_height_set = naturalHeightSet; + if (capsLockOn) { + this.add_accessible_state(Atk.StateType.SHOWING); + this.add_accessible_state(Atk.StateType.VISIBLE); + } else { + this.remove_accessible_state(Atk.StateType.SHOWING); + this.remove_accessible_state(Atk.StateType.VISIBLE); + } + this.ease({ height: capsLockOn ? height : 0, opacity: capsLockOn ? 255 : 0,